package gold.digger;

import gold.utils.InputUtil;
import gold.vo.CodeDoc;
import gold.vo.ListNode;
import gold.vo.TreeNode;

import java.util.Arrays;

/**
 * Created by fanzhenyu02 on 2020/6/27.
 * common problem solver template.
 */
public class LC226 {
    public long startExecuteTime = System.currentTimeMillis();


    class Solution {
        public TreeNode invertTree(TreeNode root) {
            if (null == root) return null;

            TreeNode temp = root.left;
            root.left = root.right;
            root.right = temp;
            invertTree(root.left);
            invertTree(root.right);
            return root;
        }
    }

    public void run() {
        Solution solution = new Solution();
        ListNode head = ListNode.createList("1->2->3->4->5");
        System.out.println(solution.toString());
    }

    public static void main(String[] args) throws Exception {
        LC226 an = new LC226();
        an.run();

        Arrays.toString("".split(","));
        InputUtil.run();
        CodeDoc.run();
        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
